import request from '@/utils/request'

// 查询系统参数表列表
export function listSysParams (query) {
  return request({
    url: '/business/sysParams/list',
    method: 'get',
    params: query
  })
}

// 查询系统参数表详细
export function getSysParams (id) {
  return request({
    url: '/business/sysParams/' + id,
    method: 'get'
  })
}

// 新增系统参数表
export function addSysParams (data) {
  return request({
    url: '/business/sysParams',
    method: 'post',
    data: data
  })
}

// 修改系统参数表
export function updateSysParams (data) {
  return request({
    url: '/business/sysParams',
    method: 'put',
    data: data
  })
}

// 删除系统参数表
export function delSysParams (id) {
  return request({
    url: '/business/sysParams/' + id,
    method: 'delete'
  })
}

// 导出系统参数表
export function exportSysParams (query) {
  return request({
    url: '/business/sysParams/export',
    method: 'get',
    params: query
  })
}

// 获取初始化数据
export function getInitData (dictTypes) {
  return request({
    url: '/business/sysParams/getInitData/' + dictTypes,
    method: 'get'
  })
}
